<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
	<script type="text/javascript">
		
//		var arr = ['买','不买','不买','不买','不买','不买','不买','不买'];
//		var num = Math.floor(Math.random()*(arr.length-1+1-0)+0);
//		document.write(arr[num]);

		
//		思路2:
		var num = Math.random()*10;
		if (num<8) {
			document.write("不买");
		}else{
			document.write("买买买！");
		}
		
		
		
	</script>
		
	</head>
	<body>
	</body>
</html>
